How have home run rates changed over time?
How have home run rates changed? Are there more homeruns now than ever?
In order to look at baseball data in R, we need a good baseball database. Luckily one exists for R already - the Lahman dataset.
In fact, there’s even an R package available for it thanks to Chris Dalzell and his team.
Let’s use this dataset to figure out if homerun rates are high now compared to historical data. First, what’s the average rate of home runs per plate appearance over time? Checking the data…
Augmented Dickey-Fuller Test
data: .
Dickey-Fuller = -2.71, Lag order = 4, p-value = 0.287
alternative hypothesis: stationary